<template>
    <div>
        <el-button size="mini" type="success" @click="to">编辑</el-button>
        <eForm ref="form" :sup_this="sup_this" :is-add="false"/>
    </div>
</template>
<script>
import eForm from './form'
export default {
    components: { eForm },
    props: {
        data: {
            type: Object,
            required: true
        },
        sup_this: {
            type: Object,
            required: true
        }
    },
    methods: {
        to() {
            const _this = this.$refs.form
            _this.getMenus()
            _this.form = { id: this.data.id, component: this.data.component, name: this.data.name, sort: this.data.sort, pid: this.data.pid, path: this.data.path, iframe: this.data.iframe.toString(), roles: [], icon: this.data.icon }
            _this.dialog = true
        }
    }
}
</script>

<style scoped>
div{
    display: inline-block;
    margin-right: 3px;
}
</style>
